<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.vote.vo.TVoteOpinionBox"%>
<%@page import="java.text.SimpleDateFormat;"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");	
	TVoteOpinionBox tvob = (TVoteOpinionBox) request.getAttribute("tvob");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>粮油集团办公自动化协作平台</title>
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />	
		<link href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/ext-all.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/jQuery/jquery.js"></script>
		<script type="text/javascript">
			$(function(){
				$.ajaxSetup({
				  async: false
				  }); 
				$(".s10 >a").attr("href","javascript:back()");
				$(".s12 >a").attr("href","javascript:del()");
			});
			
			function back(){
				window.location.href="<%=basePath%>vote/opinionBox/opinionBoxAllList.jsp";
			}			

			function del(){
                Ext.MessageBox.confirm("提示信息","'是否删除 <%=tvob.getTitle()%> ?'",function(btn){
  		           if(btn == 'yes'){
                      window.location.href="<%=basePath%>tjsinfo/tjsoa/vote/opinionBoxDel.do?id=<%=tvob.getId()%>&list=all";
  		           }		           
                });	
			}				
	    </script>
	</head>

	<body>
		<div style="height: 94%">
			<div id="right">
				<div class="p_01">
					<ul>
						<li class="s12">
							<a href="#">删除</a>
						</li>
						<li class="s10">
							<a href="#">返回</a>
						</li>
					</ul>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" height="96%">
					<tr>
						<td valign="top" height="100%">
							<div class="contabwd01">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="90%">
											<table width="95%" border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top: 10px; margin-left: 20px">
												<tr>
													<td>
														<table width="98%" border="0" cellspacing="0"
															cellpadding="0" class="jkdfont">
															<tr>
																<td align="center" style="font-size: 16px" colspan="3">
																	意 见 箱 查 看 
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td width="90%">
											<table border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top: 10px; margin-left: 25px">
												<tr>
													<td>
														<table width="785" border="0" align="left" cellpadding="0" cellspacing="0" class="ttaabb">
															<tr>
																<td width="30%" align="right">
																	<img src="<%=basePath%>images/dfdf_03.gif"/>&nbsp;匿名
																</td>
																<td colspan="2">
																	<%
																		if (tvob.getAnonymity()!= null) {
																			String anonymity = "";
																			String userName = "";
																			switch (tvob.getAnonymity()) {
																			case 0:
																				anonymity = "否";
																				userName = tvob.getUserName();
																				break;
																			case 1:
																				anonymity = "是";
																				break;
																			}
																	%>											
																	 <input name="anonymity" type="text" id="anonymity" size="20" readonly="readonly" value="<%=anonymity%>" />
																	 <input name="userName" id="userName" size="20" readonly="readonly" value="<%=userName%>" <%if(tvob.getAnonymity().equals(0)){out.println("type='text'"); }else{out.println("type='hidden'");}%>/>
																	<%
																		}
																	%>
																</td>
															</tr>
															<tr>
																<td align="right">
																	<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;标题
																</td>
																<td colspan="2">
																	<input name="title" type="text" id="title" size="94" value="<%=tvob.getTitle()%>" readonly="readonly"/>
																</td>
															</tr>
															<tr>
																<td align="right">
																	<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;时间
																</td>
																<td colspan="2">
																	<input name="datetime" type="text" id="datetime" size="94" value="<%=sdf.format(tvob.getDateTime())%>" readonly="readonly"/>
																</td>
															</tr>
															<tr>
																<td align="right">
																	<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;内容
																</td>
																<td colspan="2">
																	<textarea cols="69" rows="20" id="contact" name="contact" readonly="readonly"><%=tvob.getContact()%></textarea>
																</td>
															</tr>																
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<input type="hidden" id="basePath" value="<%=basePath%>" />
	</body>
</html>
